﻿using TCC.Framework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

namespace TCC.Framework
{
    /// <summary>
    /// 有限状态机管理
    /// </summary>
    public class FSMManager : BaseManager
    {
        private List<FsmSystemDic> _fmsList;
        public override void OnInit()
        {
            base.OnInit();
            _fmsList = new List<FsmSystemDic>();
        }

        public override void OnUpdate()
        {
            _fmsList.ForEach(p => p.m_fSM.UpdateState());
        }

        /// <summary>
        /// 添加一个状态机
        /// </summary>
        public void AddFSM(string fsmName,FSMSystem fSM)
        {

        }
    }

    [Serializable]
    public struct FsmSystemDic
    {
        public string m_key;
        public FSMSystem m_fSM;
    }
}

